﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ChiTietTinTuc : System.Web.UI.Page
{
    private DataSet objDataSet;
    private int id;
    protected void Page_Load(object sender, EventArgs e)
    {
        id = int.Parse(Request.QueryString["id"].ToString());

        if (!IsPostBack)
        {
            // Fill controls with data
            LoadChiTietTinTuc();
        }
    }

    public void LoadChiTietTinTuc()
    {
        TinTucBUS objTinTuc = new TinTucBUS(TGDDConfiguration.DbConnectionString);
        objDataSet = objTinTuc.SelectTinTuc(id);
        repChiTietTinTuc.DataSource = objDataSet.Tables[0];
        repChiTietTinTuc.DataBind();
    }
}
